if __name__ == '__main__':
    # 定义一个 行 控制变量
    i = 1
    while i <= 4:
        # print("8")
        # 定义一个 列控制变量，控制 空白字符
        j = 4
        while j - i > 0:
            print(" ", end="")
            j = j - 1
        # 定义一个 列控制变量，控制 星号字符
        k = 0
        while k < 2 * i - 1:
            print("*", end="")
            k = k + 1
        print()
        i = i + 1

    m = 1
    while m <= 3:
        n = 0
        while n < m:
            print(" ", end="")
            n = n + 1
        l = 0
        while l < 7 - 2 * m:
            print("*", end="")
            l = l + 1
        print()
        m = m + 1

